#if defined MOD_inc
#endinput
#endif
#define MOD_inc

#if !defined _samp_included
native GetServerVarAsString(const varname[], buffer[], len);
#endif

#define MOD_UNKNOWN 	255
#define MOD_SAMP 	0
#define MOD_ANDERIUS 	3
#define MOD_UNITED 	1
#define MOD_GOSTOWN 	2
#define MOD_UNITEDOLD 	6
#define MOD_OVICE 	5
#define MOD_URMCR 	4

#define MOD_UNKNOWN_NAME 	"Unknown"
#define MOD_SAMP_NAME 		"SA-MP"
#define MOD_UNITED_NAME 	"United 0.3"
#define MOD_GOSTOWN_NAME 	"Gostown"
#define MOD_ANDERIUS_NAME 	"Anderius"
#define MOD_URMCR_NAME 		"Criminal Russia"
#define MOD_OVICE_NAME 		"Open Vice"
#define MOD_UNITEDOLD_NAME 	"United 0.2.2"

#define MOD_UNKNOWN_NAME2 	"unknown"
#define MOD_SAMP_NAME2		"samp"
#define MOD_UNITED_NAME2	"united"
#define MOD_GOSTOWN_NAME2	"gostown"
#define MOD_ANDERIUS_NAME2	"anderius"
#define MOD_URMCR_NAME2		"cr"
#define MOD_OVICE_NAME2		"openvice"

#if defined MOD_CURRENT

 #if MOD_CURRENT == MOD_UNITED
  #define MOD_CURRENT_NAME MOD_UNITED_NAME
  #define MOD_CURRENT_NAME2 MOD_UNITED_NAME2
 #elseif MOD_CURRENT == MOD_GOSTOWN
  #define MOD_CURRENT_NAME MOD_GOSTOWN_NAME
  #define MOD_CURRENT_NAME2 MOD_GOSTOWN_NAME2
 #elseif MOD_CURRENT == MOD_ANDERIUS
  #define MOD_CURRENT_NAME MOD_ANDERIUS_NAME
  #define MOD_CURRENT_NAME2 MOD_ANDERIUS_NAME2
 #elseif MOD_CURRENT == MOD_URMCR
  #define MOD_CURRENT_NAME MOD_URMCR_NAME
  #define MOD_CURRENT_NAME2 MOD_URMCR_NAME2
 #elseif MOD_CURRENT == MOD_OVICE
  #define MOD_CURRENT_NAME MOD_OVICE_NAME
  #define MOD_CURRENT_NAME2 MOD_OVICE_NAME2
 #else
  #define MOD_CURRENT_NAME MOD_UNKNOWN_NAME
  #define MOD_CURRENT_NAME2 MOD_UNKNOWN_NAME2
 #endif

#endif

/*
#define _PP_CAT(%0,%1) _PP_CAT_0((%0,%1))
#define _PP_CAT_0(%0) _PP_CAT_1%0
#define _PP_CAT_1(%0,%1) _PP_CAT_2(%0...%1)
#define _PP_CAT_2(%0) %0

#define GET_MOD_NAME(%0) _PP_TEST_(%0)
#define GET_MOD_NAME2(%0) _MOD_NAME_2_%0


#define _MOD_NAME_1_0 MOD_SAMP_NAME
#define _MOD_NAME_1_1 MOD_UNITED_NAME
#define _MOD_NAME_1_2 MOD_GOSTOWN_NAME
#define _MOD_NAME_1_3 MOD_ANDERIUS_NAME
#define _MOD_NAME_1_4 MOD_URMCR_NAME
#define _MOD_NAME_1_5 MOD_OVICE_NAME

#define _MOD_NAME_2_0 MOD_SAMP_NAME2
#define _MOD_NAME_2_1 MOD_UNITED_NAME2
#define _MOD_NAME_2_2 MOD_GOSTOWN_NAME2
#define _MOD_NAME_2_3 MOD_ANDERIUS_NAME2
#define _MOD_NAME_2_4 MOD_URMCR_NAME2
#define _MOD_NAME_2_5 MOD_OVICE_NAME2

*/

stock getmod()
{
	new ver[3];
	GetServerVarAsString("version", ver, sizeof(ver));
	switch(ver[0])
	{
		case '\0': return(MOD_UNKNOWN);
		case '0': return(MOD_SAMP);
		case 'a': return(MOD_ANDERIUS);
		case 'u': return(MOD_UNITED);
		case 'g': return(MOD_GOSTOWN);
		case 'G': return(MOD_UNITEDOLD);
		case 'o': return(MOD_OVICE);
		case 'c': return(MOD_URMCR);
		default: return(MOD_UNKNOWN);
	}
	return(MOD_UNKNOWN);
}

stock getmodname(mod)
{
	new modname[20];
	switch(mod)
	{
		//case MOD_UNKNOWN: format(modname, sizeof(modname), MOD_UNKNOWN_NAME);
		case MOD_SAMP: format(modname, sizeof(modname), MOD_SAMP_NAME);
		case MOD_ANDERIUS: format(modname, sizeof(modname), MOD_ANDERIUS_NAME);
		case MOD_UNITED: format(modname, sizeof(modname), MOD_UNITED_NAME);
		case MOD_GOSTOWN: format(modname, sizeof(modname), MOD_GOSTOWN_NAME);
		//case MOD_UNITEDOLD: format(modname, sizeof(modname), MOD_UNITEDOLD_NAME);
		case MOD_OVICE:  format(modname, sizeof(modname), MOD_OVICE_NAME);
		case MOD_URMCR: format(modname, sizeof(modname), MOD_URMCR_NAME);
		default: format(modname, sizeof(modname), MOD_UNKNOWN_NAME);
	}
	return modname;
}


stock getmodname2(mod)
{
	new modname[30];
	switch(mod)
	{
		case MOD_SAMP: format(modname, sizeof(modname), MOD_SAMP_NAME2);
		case MOD_ANDERIUS: format(modname, sizeof(modname), MOD_ANDERIUS_NAME2);
		case MOD_UNITED: format(modname, sizeof(modname), MOD_UNITED_NAME2);
		case MOD_GOSTOWN: format(modname, sizeof(modname), MOD_GOSTOWN_NAME2);
		case MOD_OVICE:  format(modname, sizeof(modname), MOD_OVICE_NAME2);
		case MOD_URMCR: format(modname, sizeof(modname), MOD_URMCR_NAME2);
		default: format(modname, sizeof(modname), MOD_UNKNOWN_NAME2);
	}
	return modname;
}

stock getlsfrmodname(mod)
{
	new modname[30];
	switch(mod)
	{
		case MOD_SAMP: format(modname, sizeof(modname), "LSFR");
		case MOD_ANDERIUS: format(modname, sizeof(modname), "LSFR Anderius");
		case MOD_UNITED,
			MOD_UNITEDOLD: format(modname, sizeof(modname), "LSFR United");
		case MOD_GOSTOWN: format(modname, sizeof(modname), "LSFR Gostown");
		case MOD_OVICE:  format(modname, sizeof(modname), "LSFR OpenVice");
		case MOD_URMCR: format(modname, sizeof(modname), "LSFR CR");
		default: format(modname, sizeof(modname), MOD_UNKNOWN_NAME);
	}
	return modname;
}









